"use strict";

exports.__esModule = true;
/* flow */

/**
 * Functional composition with a 1-ary functions.ß
 * @private
 */
function compose(arr) {
  return function (value) {
    return arr.reduce(function (acc, fn) {
      return fn(acc);
    }, value);
  };
}

/**
 * Flattens a single layer of arrays.
 * @private
 */
function flatten(arr) {
  return Array.prototype.concat.apply([], arr);
}

exports.compose = compose;
exports.flatten = flatten;